Skip to main content

Mobile to Address API - v2

This document highlights details of the Mobile to Address API - v2.

API Description

Objective

The Mobile to Address API - v2 retrieves a user's verified address and contact details using their mobile number.

InputOutput
The user's mobile number and consentThe user's address information

API URL

https://ind-engine.thomas.hyperverge.co/v1/mobileToAddressV2

API Endpoint

mobileToAddressV2

Overview

The Mobile to Address API - v2 API is RESTful and uses standard HTTP verbs and status codes. The requests are in JSON format and responses are in JSON format.

Authentication

You need a unique pair of application ID ( appId ) and application key (appKey) from HyperVerge to verify your identity for accessing the Mobile to Address API - v2.

ParameterMandatory or OptionalDescriptionAllowed Values
content-type MandatoryThis parameter defines the media type for the request payloadapplication/json
appId MandatoryThe application identifier shared by HyperVerge. You can find the details in the dashboard's credentials tab.This should be a unique value.
appKey MandatoryThe application key shared by HyperVerge. You can find the details in the dashboard's credentials tab.This should be a unique value.
transactionIdMandatoryA unique identifier for tracking a user journeyThis should be both unique and easily associated with the user's journey in your application(s)

Inputs

The following table provides the details of the parameters required for the Mobile to Address API - v2's request body:

ParameterMandatory or OptionalDescription
mobileMandatory10 digit mobile number
consentMandatoryConsent flag indicating user permission (yes/no)

Request

The following code snippet demonstrates a standard curl request for the Mobile to Address API - v2:

curl --location 'https://ind-engine.thomas.hyperverge.co/v1/mobileToAddressV2' \
--header 'Content-Type: application/json' \
--header 'appId: <appId>' \
--header 'appKey: <appKey>' \
--header 'transactionId: <transactionId>' \
--data '{
"mobile": "<Enter_the_Mobile_Number>",
"consent": "<Enter_yes_or_no>"
}'

Success Response

The following code snippet demonstrates a success response from the Mobile to Address API - v2:

{
"status": "success",
"statusCode": 200,
"result": {
"address": "<Address_Information>",
"date": "<Delivery_Date>"
},
"metadata": {
"requestId": "<Request_ID>",
"transactionId": "<Transaction_ID>"
}
}

Success Response Details

The following table outlines the details of the success response from the API:

ParameterTypeDescription
statusstringThe API status indicator
statusCodeintegerThe HTTP-like status code for the API response
resultobjectThe main result object containing all response data
addressstringThe verified and structured address returned from the API
datestringThe latest delivery date in ISO 8601 format
metadataobjectThe metadata object containing request tracking information
requestIdstringThe unique request identifier generated for tracing purposes
transactionIdstringThe client-provided transaction identifier to correlate API calls

Failure Response

The following is a failure response from the API:

{
"status": "failure",
"statusCode": 404,
"error": "Record Not Found",
"metadata": {
"requestId": "<Request_ID>",
"transactionId": "<Transaction_ID>"
}
}

Error Responses

The following are some error responses from the API:

{
"status": "failure",
"statusCode": 400,
"error": "Invalid mobile number",
"metadata": {
"requestId": "<Request_ID>",
"transactionId": "<Transaction_ID>"
}
}
{
"message": "Input Validation Error: mobile does not meet minimum length of 10",
"statusCode": 400,
"status": "failure"
}

Failure and Error Response Details

A failure or error response from the module contains a failure status, with a relevant status code and error message.

The following table lists all error responses:

Status CodeError MessageDescription
400Invalid mobile numberThe mobile number provided is not in valid format
400Input Validation Error: consent is not one of enum values: yes,noThe consent is empty or not one of the allowed values(yes or no)
400Input Validation Error: requires property "consent"The consent is missing from the request
400Input Validation Error: mobile does not meet minimum length of 10The mobile number entered is empty or does not meet the minimum length requirement
400Input Validation Error: requires property "mobile"The mobile number is missing from the request
401Missing/Invalid credentialsThe request is either missing the mandatory appId and appKey combination or has invalid values
404Record Not FoundThe mobile number provided does not exist in the database
500Internal Server ErrorPlease check the request headers or contact the HyperVerge team for resolution
503External source downtimePlease contact the HyperVerge team for resolution
Was this helpful?
Ask AIBeta
Hi! How can I help?
Ask me anything about HyperVerge products, APIs, and SDKs.
Try asking: